package org.edu.modules.oa.controller;

import groovy.util.logging.Slf4j;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.edu.common.api.vo.Result;
import org.edu.common.aspect.annotation.AutoLog;
import org.edu.modules.oa.entity.VeOaMeetEntity;
import org.edu.modules.oa.service.IVeOaMyJoinMeetService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

@Api(tags="我参加的会议")
@RestController
@RequestMapping("oa/veOaMyJoinMeet")
@Slf4j
public class VeOaMyJoinMeetController {
    @Resource
    private IVeOaMyJoinMeetService iVeOaMyJoinMeetService;

    // 日志注解
    @AutoLog(value = "我参加的会议-显示表格")
    @ApiOperation(value="显示表格", notes="我参加的会议-显示表格")
    // 显示表格
    @PostMapping(value = "/showTable")
    public Result<?>showTable(Integer startPage, Integer pageSize, VeOaMeetEntity veOaMeetEntity ){
        HashMap<String, Object> map= iVeOaMyJoinMeetService.ShowMyJoinMeet(startPage,pageSize,veOaMeetEntity);
        return Result.OK(map);
    }


    //获取参与人员
    @AutoLog(value = "会议参与人员-显示表格")
    @ApiOperation(value="会议参与人员", notes="会议参与人员-显示表格")
    // 显示表格
    @PostMapping(value = "/checkUserName")
    public Result<?>checkUserName(Integer id ){
        String userName = iVeOaMyJoinMeetService.checkUser(id);
        return Result.OK(userName);

    }

}
